﻿using Lis.DTO;
using Lis.IDAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lis.KISSFRSTDAL
{
    public class UserStatusDal : BaseDal<UserStatusDto>,IUserStatusDal
    {
        #region 01，根据读者卡号查询罚金状态+IEnumerable<UserStatusDto> GetEntitiesOfUserStatusByUsername(string UserName)
        /// <summary>
        /// 根据读者卡号查询罚金状态
        /// </summary>
        /// <param name="UserName">读者卡号</param>
        /// <returns></returns>
        public IEnumerable<UserStatusDto> GetEntitiesOfUserStatusByUsername(string UserName)
        {
            return DB.QueryEntities<UserStatusDto>("Lis.UserStatus.Select.OneByUserName", new { DZTM = UserName });
        } 
        #endregion
        #region 02，分页查询+override IEnumerable<UserStatusDto> GetPageEntities<S>(int pageSize, int pageIndex, out int total, bool isAsc, System.Linq.Expressions.Expression<Func<UserStatusDto, bool>> whereLambda, System.Linq.Expressions.Expression<Func<UserStatusDto, S>> orderByLambda)
        /// <summary>
        /// 分页查询
        /// </summary>
        /// <typeparam name="S"></typeparam>
        /// <param name="pageSize">页大小</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="total">总条数</param>
        /// <param name="isAsc">是否倒叙</param>
        /// <param name="whereLambda">查询lambda</param>
        /// <param name="orderByLambda">排序lambda</param>
        /// <returns></returns>
        public override IQueryable<UserStatusDto> GetPageEntities<S>(int pageSize, int pageIndex, out int total, bool isAsc, System.Linq.Expressions.Expression<Func<UserStatusDto, bool>> whereLambda, System.Linq.Expressions.Expression<Func<UserStatusDto, S>> orderByLambda)
        {
            throw new NotImplementedException();
        } 
        #endregion
    }
}
